//
//  ShareView.swift
//  Share
//
//  Created by admin on 2020/12/17.
//  Copyright © 2020 MBA. All rights reserved.
//

import SwiftUI

struct ShareView: View {
    @State var share:Share
    var body: some View {
        VStack(alignment: .leading){
            HStack{
                Text("\(share.name)")
                Text("¥\(share.price)")
                    .font(.system(size: 12))
                    .foregroundColor(.red_1)
            }
            
            
            Text("(\(share.code))")
                .font(.caption)
        }
        .font(.system(size: 14))
        .foregroundColor(Color.grey_2)
    }
}

struct ShareView_Previews: PreviewProvider {
    static var previews: some View {
        ShareView(share: Share._shares[0])
    }
}
